/**
  ******************************************************************************
  * @file    User/tk_cfg.h
  * @author  JUSHENG Application Team
  * @version V1.0.0
  * @date    03-18-2022
  * @brief   tk configuration header file
  ******************************************************************************
  * @attention
  *
  * <h2><center>&copy; COPYRIGHT 2022 JUSHENG</center></h2>
  *
  *
  */ 
  
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __TK_CFG_H__
#define __TK_CFG_H__

#ifdef __cplusplus
 extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "include.h"


#define TK_NUM          4
     
#define TK_0                        TK_PA3 | 80
#define TK_1                        TK_PA4 | 80
#define TK_2                        TK_PA5 | 80
#define TK_3                        TK_PA6 | 80
#define TK_4                        TK_NONE
#define TK_5                        TK_NONE
#define TK_6                        TK_NONE
#define TK_7                        TK_NONE
#define TK_8                        TK_NONE
#define TK_9                        TK_NONE
#define TK_10                       TK_NONE
#define TK_11                       TK_NONE
#define TK_12                       TK_NONE
#define TK_13                       TK_NONE
#define TK_14                       TK_NONE
#define TK_15                       TK_NONE
#define TK_16                       TK_NONE
#define TK_17                       TK_NONE
#define TK_18                       TK_NONE
#define TK_19                       TK_NONE
#define TK_20                       TK_NONE
#define TK_21                       TK_NONE
#define TK_22                       TK_NONE
#define TK_23                       TK_NONE
#define TK_24                       TK_NONE
#define TK_25                       TK_NONE


#define TK_Fun0        (1<<0)
#define TK_Fun1        (1<<1)
#define TK_Fun2        (1<<2)
#define TK_Fun3        (1<<3)
#define TK_Fun4        (1<<4)
#define TK_Fun5        (1<<5)
#define TK_Fun6        (1<<6)
#define TK_Fun7        (1<<7)
#define TK_Fun8        (1<<8)
#define TK_Fun9        (1<<9)
#define TK_Fun10       (1<<10)
#define TK_Fun11       (1<<11)
#define TK_Fun12       (1<<12)
#define TK_Fun13       (1<<13)
#define TK_Fun14       (1<<14)
#define TK_Fun15       (1<<15)
#define TK_Fun16       (1<<16)
#define TK_Fun17       (1<<17)
#define TK_Fun18       (1<<18)
#define TK_Fun19       (1<<19)
#define TK_Fun20       (1<<20)
#define TK_Fun21       (1<<21)
#define TK_Fun22       (1<<22)
#define TK_Fun23       (1<<23)
#define TK_Fun24       (1<<24)
#define TK_Fun25       (1<<25)


#define PRESETBUF       0


                        
void tk_init(void);
u32 tk_process(void);
void tk_lp_init(void);
void tk_wakeup(u32 pin, u32 default_value);

void tk_enable(void);
void tk_disable(void);

void tk_uart_init(void);
void tk_debug(UART_TypeDef *p_uart, u16 *p_buf);
void tk_debug_connect_pc(void);
u32 tk_debug_process(void);

#define TK_SWD_DEBUG_EN 1
void tk_slip_strip(u16*  pslipvalue);
void tk_slip_ring(u16*  pslipvalue);
/**
  * @}
  */ 

#ifdef __cplusplus
}
#endif

#endif //__TK_CFG_H__

/**
  * @}
  */

/**
  * @}
  */

/*************************** (C) COPYRIGHT 2022 JUSHENG ***** END OF FILE *****/

